<?php if($action=="index") {?>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="keywords" content="积分搜索">
  <meta name="description" content="积分搜索">
  <title>积分搜索</title>
   <link rel="stylesheet" type="text/css" href="<?php echo site_url(); ?>app/views/css/common.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo site_url(); ?>app/views/js/themes/bootstrap/easyui.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo site_url(); ?>app/views/js/themes/icon.css" />
 
  <script type="text/javascript" src="<?php echo site_url(); ?>app/views/js/jquery.min.js"></script>
  <script type="text/javascript" src="<?php echo site_url(); ?>app/views/js/jquery.easyui.min.js"></script>
 <script type="text/javascript" src="<?php echo site_url(); ?>app/views/js/locale/easyui-lang-zh_CN.js"></script>

 
</head>
<body>



<input type="hidden" id="site_url" value="<?php echo site_url(); ?>">
  <h2 class="navfont">员工积分报表:</h2>
  
<table id="tt" class="easyui-datagrid" style="width:1200px;height:500px"
		url="asdsa.php" toolbar="#tb"
		title="" iconCls=""
		rownumbers="true" pagination="true">
	<thead>
		<tr>
    <th field="name" width="100">员工姓名</th>
     <th field="cust_no" width="100">员工编号</th>
    <?php foreach ($products as $key => $value) {?>
     <th field="<?php echo $value['id']; ?>" width="100"><?php echo $value['name'];?></th>
    <?php } ?>
			
 
			
		</tr>
	</thead>
</table>

<div id="tb" style="padding:3px">

	<span>开始时间:</span>
	<input id="starttime" type="text"style="line-height:26px;border:1px solid #ccc" class="easyui-datebox" >
	<span>结束时间:</span>
	<input id="endtime" type="text"style="line-height:26px;border:1px solid #ccc" class="easyui-datebox" >
	<a href="#" class="easyui-linkbutton" plain="true" onclick="doSearch()">搜索</a>
		<a href="#" class="easyui-linkbutton" plain="true" onclick="dao()">报表导出</a>
</div>
 
<script type="text/javascript">
 function doSearch(){
	 var starttime = $('#starttime').datebox('getValue');
 
  var endtime = $('#endtime').datebox('getValue');
  var site_url=$("#site_url").val();

  var url=site_url+"index.php/report/get_all_score/?starttime="+starttime+"&endtime="+endtime;
    $('#tt').datagrid('options').url=url;  
  $('#tt').datagrid('reload');
   }

function dao(){
var starttime = $('#starttime').datebox('getValue');
 
  var endtime = $('#endtime').datebox('getValue');
  var site_url=$("#site_url").val();

  var url=site_url+"index.php/report/get_all_dao/?starttime="+starttime+"&endtime="+endtime;
  window.location=url;
}
  

</script>







</body>
</html>


<?php 	}elseif($action=="depart"){?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="keywords" content="积分搜索">
  <meta name="description" content="积分搜索">
  <title>积分搜索</title>
   <link rel="stylesheet" type="text/css" href="<?php echo site_url(); ?>app/views/css/common.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo site_url(); ?>app/views/js/themes/bootstrap/easyui.css" />
    <link rel="stylesheet" type="text/css" href="<?php echo site_url(); ?>app/views/js/themes/icon.css" />
 
  <script type="text/javascript" src="<?php echo site_url(); ?>app/views/js/jquery.min.js"></script>
  <script type="text/javascript" src="<?php echo site_url(); ?>app/views/js/jquery.easyui.min.js"></script>
 <script type="text/javascript" src="<?php echo site_url(); ?>app/views/js/locale/easyui-lang-zh_CN.js"></script>

 
</head>
<body>




<input type="hidden" id="site_url" value="<?php echo site_url(); ?>">
  <h2 class="navfont">部门积分:</h2>
  
<table id="tt" class="easyui-datagrid" style="width:1200px;height:500px"
		url="asdsa.php" toolbar="#tb"
		title="" iconCls=""
		rownumbers="true" pagination="true">
	<thead>
		<tr>
    <th field="name" width="100">员工姓名</th>
     <th field="cust_no" width="100">员工编号</th>
		 <?php foreach ($products as $key => $value) {?>
     <th field="<?php echo $value['id']; ?>" width="100"><?php echo $value['name'];?></th>
    <?php } ?>
		</tr>
	</thead>
</table>

<div id="tb" style="padding:3px">
	
	<span>开始时间:</span>
	<input id="starttime" type="text"style="line-height:26px;border:1px solid #ccc" class="easyui-datebox" >
	<span>结束时间:</span>
	<input id="endtime" type="text"style="line-height:26px;border:1px solid #ccc" class="easyui-datebox" >
	<a href="#" class="easyui-linkbutton" plain="true" onclick="doSearch()">搜索</a>

	<a href="#" class="easyui-linkbutton" plain="true" onclick="dao()">报表导出</a>
  
</div>
 
<script type="text/javascript">
 function doSearch(){
	var starttime = $('#starttime').datebox('getValue');
 
  var endtime = $('#endtime').datebox('getValue');
  var site_url=$("#site_url").val();

  var url=site_url+"index.php/report/get_depart_score/?starttime="+starttime+"&endtime="+endtime;
    $('#tt').datagrid('options').url=url;  
  $('#tt').datagrid('reload');
}

function dao(){
	var starttime = $('#starttime').datebox('getValue');
 
  var endtime = $('#endtime').datebox('getValue');
  var site_url=$("#site_url").val();

  var url=site_url+"index.php/report/get_depart_dao/?starttime="+starttime+"&endtime="+endtime;
  window.location=url;
}
  

</script>

</body>
</html>
<?php } ?>